﻿using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using Sharp.Portal.AdminLTE;
using Sharp.Portal.Mvc;
using Sharp.Portal.Mvc.Form;

namespace Sharp.WebBooter.Areas.Demo.Models
{
    public partial class TroubleshootingModel
    {
        public class WriteOffInfo : ISharpForm
        {
            public WriteOffInfo()
            {
                UI = new BSSharpFrom(this);
            }

            [HiddenInput]
            public int Id { get; set; }

            /// <summary>
            /// 销账
            /// </summary>
            [Display(Name = "销账")]
            public bool IsWriteOff { get; set; }

            /// <summary>
            /// 销账时间
            /// </summary>
            [Display(Name = "销账时间"), DataType(DataType.Date), Required]
            public string WriteOffTime { get; set; }

            /// <summary>
            /// 销账人
            /// </summary>
            [Display(Name = "销账人"),
             CustomField(FieldType.SelectBox, "/Platform/Employee/EmployeeDialog/", DisplayField = "",
                 ValueField = nameof(WriteOffPersonId)), Required]
            public string WriteOffPerson { get; set; }
            public int WriteOffPersonId { get; set; }

            public SharpFrom UI { get; set; }
        }
    }
}